<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><script type="text/javascript" src="https://cdn.jsdelivr.net/gh/opencobra/cobratoolbox@ffa0229fc0c01c9236bb7e961f65712443277719/latest/_static/js/iframeResizer.contentWindow.min.js"></script><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,IE=9,chrome=1"><meta name="generator" content="MATLAB 2021a"><title>Analyse properties of conserved moieties</title><style type="text/css">.rtcContent { padding: 30px; } .S0 { margin: 3px 10px 5px 4px; padding: 0px; line-height: 28.8px; min-height: 0px; white-space: normal; color: rgb(213, 80, 0); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 24px; font-weight: normal; text-align: left;  }
.CodeBlock { background-color: #F7F7F7; margin: 10px 0 10px 0;}
.S1 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 1px solid rgb(233, 233, 233); border-bottom: 1px solid rgb(233, 233, 233); border-radius: 4px 4px 0px 0px; padding: 6px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px;  }
.S2 { color: rgb(64, 64, 64); padding: 10px 0px 6px 17px; background: rgb(255, 255, 255) none repeat scroll 0% 0% / auto padding-box border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px; overflow-x: hidden; line-height: 17.234px;  }
/* Styling that is common to warnings and errors is in diagnosticOutput.css */.embeddedOutputsErrorElement {    min-height: 18px;    max-height: 250px;    overflow: auto;}
.embeddedOutputsErrorElement.inlineElement {}
.embeddedOutputsErrorElement.rightPaneElement {}
/* Styling that is common to warnings and errors is in diagnosticOutput.css */.embeddedOutputsWarningElement{    min-height: 18px;    max-height: 250px;    overflow: auto;}
.embeddedOutputsWarningElement.inlineElement {}
.embeddedOutputsWarningElement.rightPaneElement {}
/* Copyright 2015-2019 The MathWorks, Inc. *//* In this file, styles are not scoped to rtcContainer since they could be in the Dojo Tooltip */.diagnosticMessage-wrapper {    font-family: Menlo, Monaco, Consolas, "Courier New", monospace;    font-size: 12px;}
.diagnosticMessage-wrapper.diagnosticMessage-warningType {    color: rgb(255,100,0);}
.diagnosticMessage-wrapper.diagnosticMessage-warningType a {    color: rgb(255,100,0);    text-decoration: underline;}
.diagnosticMessage-wrapper.diagnosticMessage-errorType {    color: rgb(230,0,0);}
.diagnosticMessage-wrapper.diagnosticMessage-errorType a {    color: rgb(230,0,0);    text-decoration: underline;}
.diagnosticMessage-wrapper .diagnosticMessage-messagePart,.diagnosticMessage-wrapper .diagnosticMessage-causePart {    white-space: normal;}
.diagnosticMessage-wrapper .diagnosticMessage-stackPart {    white-space: normal;}
.embeddedOutputsTextElement,.embeddedOutputsVariableStringElement {    white-space: normal;    word-wrap:  initial;    min-height: 18px;    max-height: 250px;    overflow: auto;}
.textElement,.rtcDataTipElement .textElement {    padding-top: 3px;}
.embeddedOutputsTextElement.inlineElement,.embeddedOutputsVariableStringElement.inlineElement {}
.inlineElement .textElement {}
.embeddedOutputsTextElement.rightPaneElement,.embeddedOutputsVariableStringElement.rightPaneElement {    min-height: 16px;}
.rightPaneElement .textElement {    padding-top: 2px;    padding-left: 9px;}
.S3 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 1px solid rgb(233, 233, 233); border-bottom: 0px none rgb(0, 0, 0); border-radius: 0px; padding: 6px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px;  }
.S4 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 0px none rgb(0, 0, 0); border-bottom: 0px none rgb(0, 0, 0); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px;  }
.S5 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 0px none rgb(0, 0, 0); border-bottom: 1px solid rgb(233, 233, 233); border-radius: 0px 0px 4px 4px; padding: 0px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px;  }
.S6 { margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: normal; text-align: left;  }
.S7 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 1px solid rgb(233, 233, 233); border-bottom: 1px solid rgb(233, 233, 233); border-radius: 4px; padding: 6px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px;  }
.S8 { margin: 10px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: normal; text-align: left;  }
.S9 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 1px solid rgb(233, 233, 233); border-bottom: 0px none rgb(0, 0, 0); border-radius: 4px 4px 0px 0px; padding: 6px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px;  }
.S10 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 0px none rgb(0, 0, 0); border-bottom: 1px solid rgb(233, 233, 233); border-radius: 0px; padding: 0px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px;  }
.S11 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 1px solid rgb(233, 233, 233); border-bottom: 1px solid rgb(233, 233, 233); border-radius: 0px; padding: 6px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px;  }
.S12 { margin: 20px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: normal; color: rgb(60, 60, 60); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: bold; text-align: left;  }
.S13 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 1px solid rgb(233, 233, 233); border-bottom: 1px solid rgb(233, 233, 233); border-radius: 0px 0px 4px 4px; padding: 6px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px;  }
.S14 { margin: 3px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: normal; color: rgb(60, 60, 60); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: bold; text-align: left;  }
.S15 { margin: 15px 10px 5px 4px; padding: 0px; line-height: 18px; min-height: 0px; white-space: normal; color: rgb(60, 60, 60); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 17px; font-weight: bold; text-align: left;  }
.S16 { margin: 3px 10px 5px 4px; padding: 0px; line-height: 18px; min-height: 0px; white-space: normal; color: rgb(60, 60, 60); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 17px; font-weight: bold; text-align: left;  }</style></head><body><div class = rtcContent><h1  class = 'S0'><span>Analyse properties of conserved moieties</span></h1><div class="CodeBlock"><div class="inlineWrapper outputs"><div  class = 'S1'><span style="white-space: normal"><span >tutorial_initConservedMoietyPaths</span></span></div><div  class = 'S2'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="933BD98B" data-testid="output_0" data-width="420" data-height="20" data-hashorizontaloverflow="false" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">modelName = </span>'DAS'</div></div></div><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement scrollableOutput" uid="541746D1" data-testid="output_1" data-width="420" data-height="20" data-hashorizontaloverflow="true" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">projectDir = </span>'/home/rfleming/work/sbgCloud/code/fork-COBRA.tutorials/analysis/conservedMoieties'</div></div></div><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement scrollableOutput" uid="4EB85A24" data-testid="output_2" data-width="420" data-height="20" data-hashorizontaloverflow="true" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">dataDir = </span>'/home/rfleming/work/sbgCloud/code/fork-COBRA.tutorials/analysis/conservedMoieties/data/models/'</div></div></div><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement scrollableOutput" uid="BBA0F0D8" data-testid="output_3" data-width="420" data-height="20" data-hashorizontaloverflow="true" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">softwareDir = </span>'/home/rfleming/work/sbgCloud/code/fork-COBRA.tutorials/analysis/conservedMoieties/software/'</div></div></div><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement scrollableOutput" uid="74850E76" data-testid="output_4" data-width="420" data-height="20" data-hashorizontaloverflow="true" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">visDataDir = </span>'/home/rfleming/work/sbgCloud/code/fork-COBRA.tutorials/analysis/conservedMoieties/data/visualisation/'</div></div></div><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement scrollableOutput" uid="BDC281E5" data-testid="output_5" data-width="420" data-height="20" data-hashorizontaloverflow="true" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">resultsDir = </span>'/home/rfleming/work/sbgCloud/code/fork-COBRA.tutorials/analysis/conservedMoieties/results/DAS_ConservedMoieties/'</div></div></div><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement scrollableOutput" uid="16D3B532" data-testid="output_6" data-width="420" data-height="20" data-hashorizontaloverflow="true" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">rxnfileDir = </span>'/home/rfleming/work/sbgCloud/code/fork-COBRA.tutorials/analysis/conservedMoieties/data/mini-ctf/rxns/atomMapped'</div></div></div></div></div><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">if </span><span >~recompute</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    load([resultsDir  modelName </span><span style="color: rgb(170, 4, 249);">'_ConservedMoietiesAnalysis.mat'</span><span >])</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">return</span></span></div></div><div class="inlineWrapper"><div  class = 'S5'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">end</span></span></div></div></div><div  class = 'S6'><span>Load the atomically resolved models derived from identifyConservedMoieties.m</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S7'><span style="white-space: normal"><span >load([resultsDir modelName </span><span style="color: rgb(170, 4, 249);">'_arm.mat'</span><span >])</span></span></div></div></div><div  class = 'S8'><span>Basic properties of atomically resolved models</span></div><div class="CodeBlock"><div class="inlineWrapper outputs"><div  class = 'S1'><span style="white-space: normal"><span >disp(arm)</span></span></div><div  class = 'S2'><div class="inlineElement eoOutputWrapper embeddedOutputsTextElement" uid="5ACBBE6F" data-testid="output_7" data-width="420" data-height="283" data-hashorizontaloverflow="false" style="width: 450px; max-height: 294px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">     MRH: [1×1 struct]
    dATM: [1×1 digraph]
    M2Ai: [11×170 double]
    Ti2R: [176×4 double]
    Ti2I: [176×6 double]
     ATG: [1×1 graph]
     M2A: [11×170 double]
     A2R: [114×4 double]
    A2Ti: [114×176 double]
     I2A: [6×170 double]
     A2I: [114×6 double]
     I2C: [6×56 double]
     C2A: [56×170 double]
     A2C: [114×56 double]
     MTG: [1×1 graph]
     I2M: [6×26 double]
     M2I: [20×6 double]
     M2M: [11×26 double]
     M2R: [20×4 double]
       L: [6×11 double]</div></div></div></div></div><div  class = 'S6'><span>Load the model, unless it is also saved with the results.</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S9'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">if </span><span >0</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    load([dataDir modelName </span><span style="color: rgb(170, 4, 249);">'.mat'</span><span >])</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    model = iDopaNeuro;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">else</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    model=arm.MRH;</span></span></div></div><div class="inlineWrapper"><div  class = 'S5'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">end</span></span></div></div></div><div  class = 'S8'><span>Identify the stoichiometrically consistent subset of the model</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S9'><span style="white-space: normal"><span >massBalanceCheck=0;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >printLevel=1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >[SConsistentMetBool, SConsistentRxnBool1, SInConsistentMetBool, SInConsistentRxnBool, unknownSConsistencyMetBool, unknownSConsistencyRxnBool, model]</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >    = findStoichConsistentSubset(model,massBalanceCheck,printLevel);</span></span></div><div  class = 'S2'><div class="inlineElement eoOutputWrapper embeddedOutputsTextElement scrollableOutput" uid="34342574" data-testid="output_8" data-width="420" data-height="143" data-hashorizontaloverflow="true" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">--- findStoichConsistentSubset START ----
--- Summary of stoichiometric consistency ----
    11	    11	 totals.
     0	     7	 heuristically external.
    11	     4	 heuristically internal:
    11	     4	 ... of which are stoichiometrically consistent.
     0	     0	 ... of which are stoichiometrically inconsistent.
     0	     0	 ... of which are of unknown consistency.
    11	     4	 Confirmed stoichiometrically consistent by leak/siphon testing.
--- findStoichConsistentSubset END ----</div></div><div class="inlineElement eoOutputWrapper embeddedOutputsWarningElement" uid="F075C228" data-testid="output_9" data-width="420" data-height="30" data-hashorizontaloverflow="false" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="diagnosticMessage-wrapper diagnosticMessage-warningType" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;"><div class="diagnosticMessage-messagePart" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;">Warning: Model did not contain a genes field. Building it along with the rules field</div><div class="diagnosticMessage-stackPart" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;"></div></div></div><div class="inlineElement eoOutputWrapper embeddedOutputsWarningElement" uid="1D6AA0C9" data-testid="output_10" data-width="420" data-height="30" data-hashorizontaloverflow="false" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="diagnosticMessage-wrapper diagnosticMessage-warningType" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;"><div class="diagnosticMessage-messagePart" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;">Warning: This function can be only be used on a model that has grRules field!\n</div><div class="diagnosticMessage-stackPart" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;"></div></div></div></div></div></div><div  class = 'S6'><span>Remove non-atom mapped part of the model, but keep the external reactions</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S9'><span style="white-space: normal"><span >keepRxnBool = getCorrespondingCols(arm.MRH.S, arm.MRH.metAtomMappedBool, true(size(arm.MRH.S,2),1), </span><span style="color: rgb(170, 4, 249);">'inclusive'</span><span >);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >keepRxnBool = keepRxnBool &amp; ~SConsistentRxnBool1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >removeRxnBool = ~(arm.MRH.rxnAtomMappedBool | keepRxnBool);</span></span></div></div><div class="inlineWrapper"><div  class = 'S5'><span style="white-space: normal"><span >model = removeRxns(arm.MRH, arm.MRH.rxns(removeRxnBool));</span></span></div></div></div><div  class = 'S8'><span>Identify the stoichiometrically consistent subset of the model</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S9'><span style="white-space: normal"><span >massBalanceCheck=1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >printLevel=1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >[SConsistentMetBool, SConsistentRxnBool2, SInConsistentMetBool, SInConsistentRxnBool, unknownSConsistencyMetBool, unknownSConsistencyRxnBool, model]</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >    = findStoichConsistentSubset(model,massBalanceCheck,printLevel);</span></span></div><div  class = 'S2'><div class="inlineElement eoOutputWrapper embeddedOutputsTextElement scrollableOutput" uid="702D72A7" data-testid="output_11" data-width="420" data-height="199" data-hashorizontaloverflow="true" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">--- findStoichConsistentSubset START ----
--- Summary of stoichiometric consistency ----
    11	    11	 totals.
     0	     7	 heuristically external.
    11	     4	 heuristically internal:
    11	     4	 ... of which are stoichiometrically consistent.
     0	     0	 ... of which are stoichiometrically inconsistent.
     0	     0	 ... of which are of unknown consistency.
---
     0	     0	 heuristically internal and stoichiometrically inconsistent or unknown consistency.
     0	     0	 ... of which are elementally imbalanced (inclusively involved metabolite).
     0	     0	 ... of which are elementally imbalanced (exclusively involved metabolite).
    11	     4	 Confirmed stoichiometrically consistent by leak/siphon testing.
--- findStoichConsistentSubset END ----</div></div><div class="inlineElement eoOutputWrapper embeddedOutputsWarningElement" uid="DAA45711" data-testid="output_12" data-width="420" data-height="30" data-hashorizontaloverflow="false" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="diagnosticMessage-wrapper diagnosticMessage-warningType" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;"><div class="diagnosticMessage-messagePart" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;">Warning: Model did not contain a genes field. Building it along with the rules field</div><div class="diagnosticMessage-stackPart" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;"></div></div></div><div class="inlineElement eoOutputWrapper embeddedOutputsWarningElement" uid="142A2409" data-testid="output_13" data-width="420" data-height="30" data-hashorizontaloverflow="false" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="diagnosticMessage-wrapper diagnosticMessage-warningType" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;"><div class="diagnosticMessage-messagePart" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;">Warning: This function can be only be used on a model that has grRules field!\n</div><div class="diagnosticMessage-stackPart" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;"></div></div></div></div></div></div><div  class = 'S6'><span>Table of model properties</span></div><div class="CodeBlock"><div class="inlineWrapper outputs"><div  class = 'S1'><span style="white-space: normal"><span >rankN=getRankLUSOL(arm.MRH.S(arm.MRH.metAtomMappedBool,arm.MRH.rxnAtomMappedBool));</span></span></div><div  class = 'S2'><div class="inlineElement eoOutputWrapper embeddedOutputsWarningElement" uid="FA9A84C9" data-testid="output_14" data-width="420" data-height="58" data-hashorizontaloverflow="false" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="diagnosticMessage-wrapper diagnosticMessage-warningType" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;"><div class="diagnosticMessage-messagePart" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;">Warning: There was an error loading the library "/home/rfleming/work/sbgCloud/code/fork-cobratoolbox/external/base/solvers/lusol/src/libclusol.so"<br style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;">Unrecognized function or variable 'libclusol_proto_glnxa64'.</div><div class="diagnosticMessage-stackPart" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;"></div></div></div><div class="inlineElement eoOutputWrapper embeddedOutputsTextElement scrollableOutput" uid="396E814C" data-testid="output_15" data-width="420" data-height="18" data-hashorizontaloverflow="true" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Caught error using lusol interface. Proceeding with matlab LU implementation (slower)</div></div></div></div><div class="inlineWrapper outputs"><div  class = 'S11'><span style="white-space: normal"><span >rankL=getRankLUSOL(arm.L);</span></span></div><div  class = 'S2'><div class="inlineElement eoOutputWrapper embeddedOutputsWarningElement" uid="E82A0E9B" data-testid="output_16" data-width="420" data-height="58" data-hashorizontaloverflow="false" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="diagnosticMessage-wrapper diagnosticMessage-warningType" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;"><div class="diagnosticMessage-messagePart" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;">Warning: There was an error loading the library "/home/rfleming/work/sbgCloud/code/fork-cobratoolbox/external/base/solvers/lusol/src/libclusol.so"<br style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;">Unrecognized function or variable 'libclusol_proto_glnxa64'.</div><div class="diagnosticMessage-stackPart" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;"></div></div></div><div class="inlineElement eoOutputWrapper embeddedOutputsTextElement scrollableOutput" uid="A0990B5B" data-testid="output_17" data-width="420" data-height="18" data-hashorizontaloverflow="true" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Caught error using lusol interface. Proceeding with matlab LU implementation (slower)</div></div></div></div><div class="inlineWrapper outputs"><div  class = 'S11'><span style="white-space: normal"><span >rankdATM=getRankLUSOL(incidence(arm.dATM));</span></span></div><div  class = 'S2'><div class="inlineElement eoOutputWrapper embeddedOutputsWarningElement" uid="741C7B9E" data-testid="output_18" data-width="420" data-height="58" data-hashorizontaloverflow="false" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="diagnosticMessage-wrapper diagnosticMessage-warningType" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;"><div class="diagnosticMessage-messagePart" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;">Warning: There was an error loading the library "/home/rfleming/work/sbgCloud/code/fork-cobratoolbox/external/base/solvers/lusol/src/libclusol.so"<br style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;">Unrecognized function or variable 'libclusol_proto_glnxa64'.</div><div class="diagnosticMessage-stackPart" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;"></div></div></div><div class="inlineElement eoOutputWrapper embeddedOutputsTextElement scrollableOutput" uid="DBE88B9C" data-testid="output_19" data-width="420" data-height="18" data-hashorizontaloverflow="true" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Caught error using lusol interface. Proceeding with matlab LU implementation (slower)</div></div></div></div><div class="inlineWrapper outputs"><div  class = 'S11'><span style="white-space: normal"><span >rankATG=getRankLUSOL(incidence(arm.ATG));</span></span></div><div  class = 'S2'><div class="inlineElement eoOutputWrapper embeddedOutputsWarningElement" uid="0ED1370E" data-testid="output_20" data-width="420" data-height="58" data-hashorizontaloverflow="false" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="diagnosticMessage-wrapper diagnosticMessage-warningType" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;"><div class="diagnosticMessage-messagePart" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;">Warning: There was an error loading the library "/home/rfleming/work/sbgCloud/code/fork-cobratoolbox/external/base/solvers/lusol/src/libclusol.so"<br style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;">Unrecognized function or variable 'libclusol_proto_glnxa64'.</div><div class="diagnosticMessage-stackPart" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;"></div></div></div><div class="inlineElement eoOutputWrapper embeddedOutputsTextElement scrollableOutput" uid="358608E1" data-testid="output_21" data-width="420" data-height="18" data-hashorizontaloverflow="true" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Caught error using lusol interface. Proceeding with matlab LU implementation (slower)</div></div></div></div><div class="inlineWrapper outputs"><div  class = 'S11'><span style="white-space: normal"><span >rankMTG=getRankLUSOL(incidence(arm.MTG));</span></span></div><div  class = 'S2'><div class="inlineElement eoOutputWrapper embeddedOutputsWarningElement" uid="A8CEF347" data-testid="output_22" data-width="420" data-height="58" data-hashorizontaloverflow="false" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="diagnosticMessage-wrapper diagnosticMessage-warningType" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;"><div class="diagnosticMessage-messagePart" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;">Warning: There was an error loading the library "/home/rfleming/work/sbgCloud/code/fork-cobratoolbox/external/base/solvers/lusol/src/libclusol.so"<br style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;">Unrecognized function or variable 'libclusol_proto_glnxa64'.</div><div class="diagnosticMessage-stackPart" style="white-space: normal; font-style: normal; color: rgb(255, 100, 0); font-size: 12px;"></div></div></div><div class="inlineElement eoOutputWrapper embeddedOutputsTextElement scrollableOutput" uid="4889A15F" data-testid="output_23" data-width="420" data-height="18" data-hashorizontaloverflow="true" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Caught error using lusol interface. Proceeding with matlab LU implementation (slower)</div></div></div></div><div class="inlineWrapper"><div  class = 'S3'></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >TT={</span><span style="color: rgb(170, 4, 249);">'Model'</span><span >, </span><span style="color: rgb(170, 4, 249);">'m+'</span><span >  , </span><span style="color: rgb(170, 4, 249);">'Metabolites'</span><span >, size(arm.MRH.S,1);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >       </span><span style="color: rgb(170, 4, 249);">''</span><span >     , </span><span style="color: rgb(170, 4, 249);">'m'</span><span >   , </span><span style="color: rgb(170, 4, 249);">'Mapped metabolites'</span><span >, nnz(arm.MRH.metAtomMappedBool);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >   </span><span style="color: rgb(170, 4, 249);">''</span><span >     , </span><span style="color: rgb(170, 4, 249);">'n+'</span><span >  , </span><span style="color: rgb(170, 4, 249);">'Reactions'</span><span >, size(arm.MRH.S,2);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >   </span><span style="color: rgb(170, 4, 249);">''</span><span >     , </span><span style="color: rgb(170, 4, 249);">''</span><span >    ,  </span><span style="color: rgb(170, 4, 249);">'Internal reactions'</span><span >, nnz(SConsistentRxnBool1);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >   </span><span style="color: rgb(170, 4, 249);">''</span><span >     , </span><span style="color: rgb(170, 4, 249);">''</span><span >    ,  </span><span style="color: rgb(170, 4, 249);">'External reactions'</span><span >, nnz(~SConsistentRxnBool1);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >   </span><span style="color: rgb(170, 4, 249);">''</span><span >     , </span><span style="color: rgb(170, 4, 249);">'n'</span><span >   , </span><span style="color: rgb(170, 4, 249);">'Mapped reactions'</span><span >, nnz(arm.MRH.rxnAtomMappedBool);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >   </span><span style="color: rgb(170, 4, 249);">'Mapped model'</span><span >     , </span><span style="color: rgb(170, 4, 249);">'m'</span><span >   , </span><span style="color: rgb(170, 4, 249);">'size(model.S,1)'</span><span >, rankN;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >   </span><span style="color: rgb(170, 4, 249);">''</span><span >     , </span><span style="color: rgb(170, 4, 249);">'n+k'</span><span >   , </span><span style="color: rgb(170, 4, 249);">'size(model.S,2)'</span><span >, size(model.S,2);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >   </span><span style="color: rgb(170, 4, 249);">''</span><span >     , </span><span style="color: rgb(170, 4, 249);">''</span><span >    ,  </span><span style="color: rgb(170, 4, 249);">'Internal reactions'</span><span >, nnz(SConsistentRxnBool2);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >   </span><span style="color: rgb(170, 4, 249);">''</span><span >     , </span><span style="color: rgb(170, 4, 249);">''</span><span >    ,  </span><span style="color: rgb(170, 4, 249);">'External reactions'</span><span >, nnz(~SConsistentRxnBool2);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >   </span><span style="color: rgb(170, 4, 249);">''</span><span >     , </span><span style="color: rgb(170, 4, 249);">'r'</span><span >   , </span><span style="color: rgb(170, 4, 249);">'Rank(N)'</span><span >, rankN;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >   </span><span style="color: rgb(170, 4, 249);">''</span><span >     , </span><span style="color: rgb(170, 4, 249);">'m-r' </span><span >, </span><span style="color: rgb(170, 4, 249);">'Row rank deficiency(N)'</span><span >, nnz(arm.MRH.metAtomMappedBool) - rankN;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >   </span><span style="color: rgb(170, 4, 249);">''</span><span >     , </span><span style="color: rgb(170, 4, 249);">''</span><span >    ,  </span><span style="color: rgb(170, 4, 249);">'Isomorphism classes'</span><span >, size(arm.L,1); </span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >   </span><span style="color: rgb(170, 4, 249);">''</span><span >     , </span><span style="color: rgb(170, 4, 249);">''</span><span >    ,  </span><span style="color: rgb(170, 4, 249);">'Independent isomorphism classes'</span><span >, rankL; </span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >   </span><span style="color: rgb(170, 4, 249);">'MTG'</span><span >  , </span><span style="color: rgb(170, 4, 249);">''</span><span >    ,  </span><span style="color: rgb(170, 4, 249);">'Moieties'</span><span >, size(arm.I2M,2); </span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >   </span><span style="color: rgb(170, 4, 249);">''</span><span >     , </span><span style="color: rgb(170, 4, 249);">''</span><span >    ,  </span><span style="color: rgb(170, 4, 249);">'Moiety transitions'</span><span >, size(arm.M2I,1); </span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >   </span><span style="color: rgb(170, 4, 249);">''</span><span >     , </span><span style="color: rgb(170, 4, 249);">''</span><span >    ,  </span><span style="color: rgb(170, 4, 249);">'Rank(M)'</span><span >, rankMTG; </span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >  </span><span style="color: rgb(170, 4, 249);">'ATG'</span><span >   , </span><span style="color: rgb(170, 4, 249);">''</span><span >    ,  </span><span style="color: rgb(170, 4, 249);">'Atoms'</span><span >, size(arm.I2A,2); </span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >   </span><span style="color: rgb(170, 4, 249);">''</span><span >     , </span><span style="color: rgb(170, 4, 249);">''</span><span >    ,  </span><span style="color: rgb(170, 4, 249);">'Atom transitions'</span><span >, size(arm.A2I,1); </span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >   </span><span style="color: rgb(170, 4, 249);">''</span><span >     , </span><span style="color: rgb(170, 4, 249);">''</span><span >    ,  </span><span style="color: rgb(170, 4, 249);">'Rank(A)'</span><span >, rankATG; </span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >   </span><span style="color: rgb(170, 4, 249);">''</span><span >     , </span><span style="color: rgb(170, 4, 249);">''</span><span >    ,  </span><span style="color: rgb(170, 4, 249);">'Row rank deficiency(A)'</span><span >, size(arm.I2A,2) - rankATG;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >   </span><span style="color: rgb(170, 4, 249);">''</span><span >     , </span><span style="color: rgb(170, 4, 249);">''</span><span >    ,  </span><span style="color: rgb(170, 4, 249);">'Components'</span><span >, size(arm.C2A,1); </span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(170, 4, 249);">'dATM'</span><span >    , </span><span style="color: rgb(170, 4, 249);">''</span><span >    ,  </span><span style="color: rgb(170, 4, 249);">'Atoms'</span><span >, size(arm.dATM.Nodes,1); </span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >   </span><span style="color: rgb(170, 4, 249);">''</span><span >     , </span><span style="color: rgb(170, 4, 249);">''</span><span >    ,  </span><span style="color: rgb(170, 4, 249);">'Directed atom transition instances'</span><span >, size(arm.dATM.Edges,1); </span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >   </span><span style="color: rgb(170, 4, 249);">''</span><span >     , </span><span style="color: rgb(170, 4, 249);">''</span><span >    ,  </span><span style="color: rgb(170, 4, 249);">'Rank(dATM)'</span><span >, rankdATM; </span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >   </span><span style="color: rgb(170, 4, 249);">''</span><span >     , </span><span style="color: rgb(170, 4, 249);">''</span><span >    ,  </span><span style="color: rgb(170, 4, 249);">'Row rank deficiency(dATM)'</span><span >, size(arm.dATM.Edges,1) - rankdATM;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >   </span><span style="color: rgb(170, 4, 249);">''</span><span >     , </span><span style="color: rgb(170, 4, 249);">''</span><span >    ,  </span><span style="color: rgb(170, 4, 249);">''</span><span >, NaN;  </span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >   };</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >disp(TT)</span></span></div><div  class = 'S2'><div class="inlineElement eoOutputWrapper embeddedOutputsTextElement scrollableOutput" uid="65C6FAF6" data-testid="output_24" data-width="420" data-height="381" data-hashorizontaloverflow="true" style="width: 450px; max-height: 392px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">    {'Model'       }    {'m+'    }    {'Metabolites'                   }    {[ 11]}
    {0×0 char      }    {'m'     }    {'Mapped metabolites'            }    {[ 11]}
    {0×0 char      }    {'n+'    }    {'Reactions'                     }    {[ 11]}
    {0×0 char      }    {0×0 char}    {'Internal reactions'            }    {[  4]}
    {0×0 char      }    {0×0 char}    {'External reactions'            }    {[  7]}
    {0×0 char      }    {'n'     }    {'Mapped reactions'              }    {[  4]}
    {'Mapped model'}    {'m'     }    {'size(model.S,1)'               }    {[  4]}
    {0×0 char      }    {'n+k'   }    {'size(model.S,2)'               }    {[ 11]}
    {0×0 char      }    {0×0 char}    {'Internal reactions'            }    {[  4]}
    {0×0 char      }    {0×0 char}    {'External reactions'            }    {[  7]}
    {0×0 char      }    {'r'     }    {'Rank(N)'                       }    {[  4]}
    {0×0 char      }    {'m-r'   }    {'Row rank deficiency(N)'        }    {[  7]}
    {0×0 char      }    {0×0 char}    {'Isomorphism classes'           }    {[  6]}
    {0×0 char      }    {0×0 char}    {'Independent isomorphism clas…'}    {[  6]}
    {'MTG'         }    {0×0 char}    {'Moieties'                      }    {[ 26]}
    {0×0 char      }    {0×0 char}    {'Moiety transitions'            }    {[ 20]}
    {0×0 char      }    {0×0 char}    {'Rank(M)'                       }    {[ 20]}
    {'ATG'         }    {0×0 char}    {'Atoms'                         }    {[170]}
    {0×0 char      }    {0×0 char}    {'Atom transitions'              }    {[114]}
    {0×0 char      }    {0×0 char}    {'Rank(A)'                       }    {[114]}
    {0×0 char      }    {0×0 char}    {'Row rank deficiency(A)'        }    {[ 56]}
    {0×0 char      }    {0×0 char}    {'Components'                    }    {[ 56]}
    {'dATM'        }    {0×0 char}    {'Atoms'                         }    {[170]}
    {0×0 char      }    {0×0 char}    {'Directed atom transition ins…'}    {[176]}
    {0×0 char      }    {0×0 char}    {'Rank(dATM)'                    }    {[114]}
    {0×0 char      }    {0×0 char}    {'Row rank deficiency(dATM)'     }    {[ 62]}
    {0×0 char      }    {0×0 char}    {0×0 char                        }    {[NaN]}</div></div></div></div></div><h2  class = 'S12'><span></span></h2><h2  class = 'S12'><span>Properties of conserved moieties</span></h2><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S9'><span style="white-space: normal"><span >[moietyMasses, knownmoietyMasses, unknownElements, Ematrix, elements] = getMolecularMass(moietyFormulae);</span></span></div></div><div class="inlineWrapper"><div  class = 'S5'><span style="white-space: normal"><span >[metMasses, knownmetMasses, unknownElements, Ematrix, elements] = getMolecularMass(model.metFormulas);</span></span></div></div></div><div  class = 'S8'><span>Compare the distributions of the molecular moietyMasses</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S9'><span style="white-space: normal"><span >figure</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >hold </span><span style="color: rgb(170, 4, 249);">on</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >h = histogram(moietyMasses);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >xlabel(</span><span style="color: rgb(170, 4, 249);">'mass (AMU)'</span><span >)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >ylabel(</span><span style="color: rgb(170, 4, 249);">'conserved moiety abundance'</span><span >)</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >title(</span><span style="color: rgb(170, 4, 249);">'Molecular mass of conserved moieties in iDopa model'</span><span >)</span></span></div><div  class = 'S2'><div class="inlineElement eoOutputWrapper embeddedOutputsFigure" uid="BBAE2614" data-testid="output_25" style="width: 450px;"><div class="figureElement"><img class="figureImage figureContainingNode" src="" style="width: 560px;"></div></div></div></div></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S9'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">%h2.BinWidth = 0.25;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >figure</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >moietyIncidence = sum(arm.L~=0,2);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >loglog(moietyMasses,moietyIncidence,</span><span style="color: rgb(170, 4, 249);">'.'</span><span >)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >title(</span><span style="color: rgb(170, 4, 249);">'Conserved moiety mass vs incidence'</span><span >)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >xlabel(</span><span style="color: rgb(170, 4, 249);">'mass (AMU)'</span><span >)</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >ylabel(</span><span style="color: rgb(170, 4, 249);">'metabolite incidence'</span><span >)</span></span></div><div  class = 'S2'><div class="inlineElement eoOutputWrapper embeddedOutputsFigure" uid="C0405CB2" data-testid="output_26" style="width: 450px;"><div class="figureElement"><img class="figureImage figureContainingNode" src="" style="width: 560px;"></div></div></div></div></div><div  class = 'S6'><span>The metabolite mass vs mass weighted incidence of moieties in each metabolite should be a straight line trough the origin if all of the moieties that make up a metabolite are present and the formula for the metabolite is correct. Sometimes the metabolite formula is ambiguous, e.g., FULLR in the formula, so the mass will be incorrect.</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S9'><span style="white-space: normal"><span >figure</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >approxMetMasses = arm.L'*moietyMasses;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >plot(metMasses,approxMetMasses,</span><span style="color: rgb(170, 4, 249);">'.'</span><span >)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >xlabel(</span><span style="color: rgb(170, 4, 249);">'Metabolite mass'</span><span >)</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >ylabel(</span><span style="color: rgb(170, 4, 249);">'Mass weighted incidence of moieties in each metabolite'</span><span >)</span></span></div><div  class = 'S2'><div class="inlineElement eoOutputWrapper embeddedOutputsFigure" uid="58292FCD" data-testid="output_27" style="width: 450px;"><div class="figureElement"><img class="figureImage figureContainingNode" src="" style="width: 560px;"></div></div></div></div><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: normal"><span >massDifference = abs(approxMetMasses-metMasses)./metMasses;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >bool=massDifference &gt;0.1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >n=1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >C = cell(nnz(bool),6);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">for </span><span >i=1:size(model.S,1)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">if </span><span >bool(i)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        C(n,:)={i, massDifference(i),model.mets{i},model.metFormulas{i},metMasses(i),approxMetMasses(i)};</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        n=n+1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >C=sortrows(C,5,</span><span style="color: rgb(170, 4, 249);">'descend'</span><span >);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >T=cell2table(C);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >T.Properties.VariableNames={</span><span style="color: rgb(170, 4, 249);">'index'</span><span >,</span><span style="color: rgb(170, 4, 249);">'massDifference'</span><span >,</span><span style="color: rgb(170, 4, 249);">'mets'</span><span >,</span><span style="color: rgb(170, 4, 249);">'metFormula'</span><span >,</span><span style="color: rgb(170, 4, 249);">'metMass'</span><span >,</span><span style="color: rgb(170, 4, 249);">'approxMetMass'</span><span >};</span></span></div></div><div class="inlineWrapper"><div  class = 'S5'><span style="white-space: normal"><span >disp(T)</span></span></div></div></div><div  class = 'S8'><span></span></div><div  class = 'S6'><span>Metabolites with mass most similar to the mass of the moiety they contain</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S9'><span style="white-space: normal"><span >[minimalMassMetabolite, minimalMassFraction, numMinimalMassMetabolites] = representativeMolecule(arm.L,moietyFormulae,model.mets);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">if </span><span >~isfield(model,</span><span style="color: rgb(170, 4, 249);">'metNames'</span><span >)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    model.metNames = model.mets;</span></span></div></div><div class="inlineWrapper"><div  class = 'S5'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">end</span></span></div></div></div><h2  class = 'S12'><span>High molecular weight moieties that are present in many metabolites.</span></h2><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S9'><span style="white-space: normal"><span >massWeightedIncidence=diag(moietyMasses)*arm.L*ones(size(arm.L,2),1);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >[massWeightedIncidenceSorted, xi] = sort(massWeightedIncidence,</span><span style="color: rgb(170, 4, 249);">'descend'</span><span >);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >bool=false(size(arm.L,1),1);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >bool(xi(1:min(length(xi),30)))=1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >C = cell(nnz(bool),9);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >n=1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">for </span><span >i=1:size(arm.L,1)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">if </span><span >bool(i)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        ind = find(strcmp(minimalMassMetabolite{i},model.mets));</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        C(n,1:9) = {i,nnz(arm.L(i,:)),nnz(model.S((arm.L(i,:)~=0)',:)~=0),moietyFormulae{i},moietyMasses(i),minimalMassMetabolite{i},model.metNames{ind},model.metFormulas{ind},minimalMassFraction(i)};</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        n=n+1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >C=sortrows(C,5,</span><span style="color: rgb(170, 4, 249);">'descend'</span><span >);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >T=cell2table(C);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >T.Properties.VariableNames={</span><span style="color: rgb(170, 4, 249);">'index'</span><span >,</span><span style="color: rgb(170, 4, 249);">'metabolites'</span><span >,</span><span style="color: rgb(170, 4, 249);">'rxns'</span><span >,</span><span style="color: rgb(170, 4, 249);">'moietyformula'</span><span >,</span><span style="color: rgb(170, 4, 249);">'mass'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Minimalmassmetabolite'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Name'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Formula'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Massfraction'</span><span >};</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >size(T,1)</span></span></div><div  class = 'S2'><div class='variableElement' style='font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12px; '>ans = 6</div></div></div><div class="inlineWrapper outputs"><div  class = 'S11'><span style="white-space: normal"><span >disp(T)</span></span></div><div  class = 'S2'><div class="inlineElement eoOutputWrapper embeddedOutputsTextElement scrollableOutput" uid="608C1352" data-testid="output_29" data-width="420" data-height="129" data-hashorizontaloverflow="true" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">index</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">metabolites</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">rxns</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">moietyformula</strong>     <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">mass</strong>     <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Minimalmassmetabolite</strong>      <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Name</strong>          <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Formula</strong>       <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Massfraction</strong>
    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">_____</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">___________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">____</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">_____________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">______</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">_____________________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">_________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">_____________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">____________</strong>

      3           2           6     {'C9H13N5O3'}     239.1          {'dhbpt'}          {'dhbpt'}    {'C9H13N5O3'}             1  
      1           4           8     {'C8H11N'   }    121.09          {'dopa' }          {'dopa' }    {'C8H12NO2' }       0.78585  
      2           5          11     {'CO2'      }     43.99          {'co2'  }          {'co2'  }    {'CO2'      }             1  
      6           5          12     {'O'        }    15.995          {'h2o'  }          {'h2o'  }    {'H2O'      }       0.88809  
      4           4          11     {'H'        }    1.0078          {'h'    }          {'h'    }    {'H'        }             1  
      5           3           8     {'H'        }    1.0078          {'h2o'  }          {'h2o'  }    {'H2O'      }      0.055957  </div></div></div></div></div><h2  class = 'S12'><span>Moieties that are present in a near maximal number of metabolites.</span></h2><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S9'><span style="white-space: normal"><span >bool=moietyIncidence&gt;=100;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >C = cell(nnz(bool),9);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >n=1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">for </span><span >i=1:size(arm.L,1)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">if </span><span >bool(i)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        ind = find(strcmp(minimalMassMetabolite{i},model.mets));</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        C(n,1:9) = {i,nnz(arm.L(i,:)),nnz(model.S((arm.L(i,:)~=0)',:)~=0),moietyFormulae{i},moietyMasses(i),minimalMassMetabolite{i},model.metNames{ind},model.metFormulas{ind},minimalMassFraction(i)};</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        n=n+1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >C=sortrows(C,2,</span><span style="color: rgb(170, 4, 249);">'descend'</span><span >);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >T=cell2table(C);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >T.Properties.VariableNames={</span><span style="color: rgb(170, 4, 249);">'index'</span><span >,</span><span style="color: rgb(170, 4, 249);">'metabolites'</span><span >,</span><span style="color: rgb(170, 4, 249);">'rxns'</span><span >,</span><span style="color: rgb(170, 4, 249);">'moietyformula'</span><span >,</span><span style="color: rgb(170, 4, 249);">'mass'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Minimalmassmetabolite'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Name'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Formula'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Massfraction'</span><span >};</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >size(T,1)</span></span></div><div  class = 'S2'><div class='variableElement' style='font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12px; '>ans = 0</div></div></div><div class="inlineWrapper"><div  class = 'S13'><span style="white-space: normal"><span >disp(T)</span></span></div></div></div><h2  class = 'S14'><span>Moieties that are present in a moderate number of metabolites.</span></h2><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S9'><span style="white-space: normal"><span >bool= moietyIncidence&gt;=10 &amp; moietyIncidence&lt;=100;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >C = cell(nnz(bool),9);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >n=1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">for </span><span >i=1:size(arm.L,1)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">if </span><span >bool(i)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        ind = find(strcmp(minimalMassMetabolite{i},model.mets));</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        C(n,1:9) = {i,nnz(arm.L(i,:)),nnz(model.S((arm.L(i,:)~=0)',:)~=0),moietyFormulae{i},moietyMasses(i),minimalMassMetabolite{i},model.metNames{ind},model.metFormulas{ind},minimalMassFraction(i)};</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        n=n+1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >C=sortrows(C,9,</span><span style="color: rgb(170, 4, 249);">'descend'</span><span >);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >T=cell2table(C);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >T.Properties.VariableNames={</span><span style="color: rgb(170, 4, 249);">'index'</span><span >,</span><span style="color: rgb(170, 4, 249);">'metabolites'</span><span >,</span><span style="color: rgb(170, 4, 249);">'rxns'</span><span >,</span><span style="color: rgb(170, 4, 249);">'moietyformula'</span><span >,</span><span style="color: rgb(170, 4, 249);">'mass'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Minimalmassmetabolite'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Name'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Formula'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Massfraction'</span><span >};</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >size(T,1)</span></span></div><div  class = 'S2'><div class='variableElement' style='font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12px; '>ans = 0</div></div></div><div class="inlineWrapper"><div  class = 'S13'><span style="white-space: normal"><span >disp(T)</span></span></div></div></div><h2  class = 'S12'><span>Moieties that are present in a small number of metabolites.</span></h2><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S9'><span style="white-space: normal"><span >bool= moietyIncidence&gt;2 &amp; moietyIncidence&lt;=10;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >C = cell(nnz(bool),9);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >n=1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">for </span><span >i=1:size(arm.L,1)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">if </span><span >bool(i)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        ind = find(strcmp(minimalMassMetabolite{i},model.mets));</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        C(n,1:9) = {i,nnz(arm.L(i,:)),nnz(model.S((arm.L(i,:)~=0)',:)~=0),moietyFormulae{i},moietyMasses(i),minimalMassMetabolite{i},model.metNames{ind},model.metFormulas{ind},minimalMassFraction(i)};</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        n=n+1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >C=sortrows(C,5,</span><span style="color: rgb(170, 4, 249);">'descend'</span><span >);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >T=cell2table(C);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >T.Properties.VariableNames={</span><span style="color: rgb(170, 4, 249);">'index'</span><span >,</span><span style="color: rgb(170, 4, 249);">'metabolites'</span><span >,</span><span style="color: rgb(170, 4, 249);">'rxns'</span><span >,</span><span style="color: rgb(170, 4, 249);">'moietyformula'</span><span >,</span><span style="color: rgb(170, 4, 249);">'mass'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Minimalmassmetabolite'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Name'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Formula'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Massfraction'</span><span >};</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >size(T,1)</span></span></div><div  class = 'S2'><div class='variableElement' style='font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12px; '>ans = 5</div></div></div><div class="inlineWrapper outputs"><div  class = 'S11'><span style="white-space: normal"><span >disp(T)</span></span></div><div  class = 'S2'><div class="inlineElement eoOutputWrapper embeddedOutputsTextElement scrollableOutput" uid="D19AAC6E" data-testid="output_33" data-width="420" data-height="115" data-hashorizontaloverflow="true" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">index</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">metabolites</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">rxns</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">moietyformula</strong>     <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">mass</strong>     <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Minimalmassmetabolite</strong>      <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Name</strong>        <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Formula</strong>       <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Massfraction</strong>
    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">_____</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">___________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">____</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">_____________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">______</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">_____________________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">____________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">____________</strong>

      1           4           8      {'C8H11N'}      121.09          {'dopa'}           {'dopa'}    {'C8H12NO2'}       0.78585  
      2           5          11      {'CO2'   }       43.99          {'co2' }           {'co2' }    {'CO2'     }             1  
      6           5          12      {'O'     }      15.995          {'h2o' }           {'h2o' }    {'H2O'     }       0.88809  
      4           4          11      {'H'     }      1.0078          {'h'   }           {'h'   }    {'H'       }             1  
      5           3           8      {'H'     }      1.0078          {'h2o' }           {'h2o' }    {'H2O'     }      0.055957  </div></div></div></div></div><h2  class = 'S12'><span>Moieties that are present in a minimal number of metabolites.</span></h2><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S9'><span style="white-space: normal"><span >bool=moietyIncidence==2;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >C = cell(nnz(bool),11);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >n=1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">for </span><span >i=1:size(arm.L,1)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">if </span><span >bool(i)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        ind = find(arm.L(i,:)~=0);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        C(n,1:11) = {i,moietyFormulae{i},moietyMasses(i),model.mets{ind(1)},model.metNames{ind(1)},model.metFormulas{ind(1)},model.mets{ind(2)},model.metNames{ind(2)},model.metFormulas{ind(2)},minimalMassMetabolite{i},minimalMassFraction(i)};</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        n=n+1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >C=sortrows(C,3,</span><span style="color: rgb(170, 4, 249);">'descend'</span><span >);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >T=cell2table(C);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >T.Properties.VariableNames={</span><span style="color: rgb(170, 4, 249);">'index'</span><span >,</span><span style="color: rgb(170, 4, 249);">'moietyformula'</span><span >,</span><span style="color: rgb(170, 4, 249);">'mass'</span><span >,</span><span style="color: rgb(170, 4, 249);">'met1'</span><span >,</span><span style="color: rgb(170, 4, 249);">'name1'</span><span >,</span><span style="color: rgb(170, 4, 249);">'formula1'</span><span >,</span><span style="color: rgb(170, 4, 249);">'met2'</span><span >,</span><span style="color: rgb(170, 4, 249);">'name2'</span><span >,</span><span style="color: rgb(170, 4, 249);">'formula2'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Minimalmassmetabolite'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Massfraction'</span><span >};</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >size(T,1)</span></span></div><div  class = 'S2'><div class='variableElement' style='font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12px; '>ans = 1</div></div></div><div class="inlineWrapper outputs"><div  class = 'S11'><span style="white-space: normal"><span >disp(T)</span></span></div><div  class = 'S2'><div class="inlineElement eoOutputWrapper embeddedOutputsTextElement scrollableOutput" uid="57A5EF27" data-testid="output_35" data-width="420" data-height="59" data-hashorizontaloverflow="true" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">index</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">moietyformula</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">mass</strong>       <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">met1</strong>         <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">name1</strong>        <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">formula1</strong>         <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">met2</strong>         <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">name2</strong>        <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">formula2</strong>       <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Minimalmassmetabolite</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Massfraction</strong>
    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">_____</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">_____________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">_____</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">_________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">_________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">_____________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">_________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">_________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">_____________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">_____________________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">____________</strong>

      3      {'C9H13N5O3'}    239.1    {'thbpt'}    {'thbpt'}    {'C9H15N5O3'}    {'dhbpt'}    {'dhbpt'}    {'C9H13N5O3'}          {'dhbpt'}               1      </div></div></div></div></div><h2  class = 'S12'><span>Classification of conserved moieties</span></h2><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S7'><span style="white-space: normal"><span >moietyTypes = classifyMoieties(arm.L, model.S);</span></span></div></div></div><div  class = 'S8'><span>An 'Internal' moiety is one that either does not participate in any exchange reaction or is conserved by all exchange reactions</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S9'><span style="white-space: normal"><span >isInternalMoiety = strcmp(</span><span style="color: rgb(170, 4, 249);">'Internal'</span><span >,moietyTypes);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >bool = isInternalMoiety;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >C = cell(nnz(bool),8);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >n=1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">for </span><span >i=1:size(arm.L,1)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">if </span><span >bool(i)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        ind = find(arm.L(i,:)~=0);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        C(n,1:8) = {i,nnz(arm.L(i,:)),nnz(model.S((arm.L(i,:)~=0)',:)~=0),moietyFormulae{i},moietyMasses(i),model.mets{ind(1)},model.metNames{ind(1)},model.metFormulas{ind(1)}};</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        n=n+1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >C=sortrows(C,5,</span><span style="color: rgb(170, 4, 249);">'descend'</span><span >);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >T=cell2table(C);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >T.Properties.VariableNames={</span><span style="color: rgb(170, 4, 249);">'index'</span><span >,</span><span style="color: rgb(170, 4, 249);">'metabolites'</span><span >,</span><span style="color: rgb(170, 4, 249);">'rxns'</span><span >,</span><span style="color: rgb(170, 4, 249);">'moietyformula'</span><span >,</span><span style="color: rgb(170, 4, 249);">'mass'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Examplemet'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Examplename'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Exampleformula'</span><span >};</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >size(T,1)</span></span></div><div  class = 'S2'><div class='variableElement' style='font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12px; '>ans = 1</div></div></div><div class="inlineWrapper outputs"><div  class = 'S11'><span style="white-space: normal"><span >disp(T)</span></span></div><div  class = 'S2'><div class="inlineElement eoOutputWrapper embeddedOutputsTextElement scrollableOutput" uid="62E7444E" data-testid="output_37" data-width="420" data-height="59" data-hashorizontaloverflow="true" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">index</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">metabolites</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">rxns</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">moietyformula</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">mass</strong>     <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Examplemet</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Examplename</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Exampleformula</strong>
    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">_____</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">___________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">____</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">_____________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">_____</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">__________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">___________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">______________</strong>

      3           2          6      {'C9H13N5O3'}    239.1    {'thbpt'}      {'thbpt'}     {'C9H15N5O3'} </div></div></div></div></div><h3  class = 'S15'><span>A 'Transitive' moiety is one that is only found in primary metabolites</span></h3><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S9'><span style="white-space: normal"><span >isTransititiveMoiety= strcmp(</span><span style="color: rgb(170, 4, 249);">'Transitive'</span><span >,moietyTypes);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >bool = isTransititiveMoiety;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >C = cell(nnz(bool),9);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >n=1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">for </span><span >i=1:size(arm.L,1)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">if </span><span >bool(i)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        ind = find(strcmp(minimalMassMetabolite{i},model.mets));</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        C(n,1:9) = {i,nnz(arm.L(i,:)),nnz(model.S((arm.L(i,:)~=0)',:)~=0),moietyFormulae{i},moietyMasses(i),minimalMassMetabolite{i},model.metNames{ind},model.metFormulas{ind},minimalMassFraction(i)};</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        n=n+1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >C=sortrows(C,9,</span><span style="color: rgb(170, 4, 249);">'descend'</span><span >);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >T=cell2table(C);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >T.Properties.VariableNames={</span><span style="color: rgb(170, 4, 249);">'index'</span><span >,</span><span style="color: rgb(170, 4, 249);">'metabolites'</span><span >,</span><span style="color: rgb(170, 4, 249);">'rxns'</span><span >,</span><span style="color: rgb(170, 4, 249);">'moietyformula'</span><span >,</span><span style="color: rgb(170, 4, 249);">'mass'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Minimalmassmetabolite'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Name'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Formula'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Massfraction'</span><span >};</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >size(T,1)</span></span></div><div  class = 'S2'><div class='variableElement' style='font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12px; '>ans = 3</div></div></div><div class="inlineWrapper outputs"><div  class = 'S11'><span style="white-space: normal"><span >disp(T)</span></span></div><div  class = 'S2'><div class="inlineElement eoOutputWrapper embeddedOutputsTextElement scrollableOutput" uid="ABF7DBC3" data-testid="output_39" data-width="420" data-height="87" data-hashorizontaloverflow="true" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">index</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">metabolites</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">rxns</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">moietyformula</strong>     <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">mass</strong>     <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Minimalmassmetabolite</strong>      <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Name</strong>        <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Formula</strong>       <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Massfraction</strong>
    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">_____</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">___________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">____</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">_____________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">______</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">_____________________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">____________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">____________</strong>

      2           5          11      {'CO2'   }       43.99          {'co2' }           {'co2' }    {'CO2'     }            1   
      6           5          12      {'O'     }      15.995          {'h2o' }           {'h2o' }    {'H2O'     }      0.88809   
      1           4           8      {'C8H11N'}      121.09          {'dopa'}           {'dopa'}    {'C8H12NO2'}      0.78585   </div></div></div></div></div><h3  class = 'S15'><span>An 'Integrative' moiety is one that is not conserved in the open network and found in both primary and secondary metabolites.</span></h3><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S9'><span style="white-space: normal"><span >bool= strcmp(</span><span style="color: rgb(170, 4, 249);">'Integrative'</span><span >,moietyTypes);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >C = cell(nnz(bool),8);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >n=1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">for </span><span >i=1:size(arm.L,1)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">if </span><span >bool(i)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        ind = find(arm.L(i,:)~=0);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        C(n,1:8) = {i,nnz(arm.L(i,:)),nnz(model.S((arm.L(i,:)~=0)',:)~=0),moietyFormulae{i},moietyMasses(i),model.mets{ind(1)},model.metNames{ind(1)},model.metFormulas{ind(1)}};</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        n=n+1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >C=sortrows(C,5,</span><span style="color: rgb(170, 4, 249);">'descend'</span><span >);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >T=cell2table(C);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >T.Properties.VariableNames={</span><span style="color: rgb(170, 4, 249);">'index'</span><span >,</span><span style="color: rgb(170, 4, 249);">'metabolites'</span><span >,</span><span style="color: rgb(170, 4, 249);">'rxns'</span><span >,</span><span style="color: rgb(170, 4, 249);">'moietyformula'</span><span >,</span><span style="color: rgb(170, 4, 249);">'mass'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Examplemet'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Examplename'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Exampleformula'</span><span >};</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >size(T,1)</span></span></div><div  class = 'S2'><div class='variableElement' style='font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12px; '>ans = 2</div></div></div><div class="inlineWrapper outputs"><div  class = 'S11'><span style="white-space: normal"><span >disp(T)</span></span></div><div  class = 'S2'><div class="inlineElement eoOutputWrapper embeddedOutputsTextElement scrollableOutput" uid="5402C919" data-testid="output_41" data-width="420" data-height="73" data-hashorizontaloverflow="true" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">index</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">metabolites</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">rxns</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">moietyformula</strong>     <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">mass</strong>     <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Examplemet</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Examplename</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Exampleformula</strong>
    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">_____</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">___________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">____</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">_____________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">______</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">__________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">___________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">______________</strong>

      4           4          11         {'H'}        1.0078    {'thbpt'}      {'thbpt'}     {'C9H15N5O3'} 
      5           3           8         {'H'}        1.0078    {'thbpt'}      {'thbpt'}     {'C9H15N5O3'} </div></div></div></div></div><h2  class = 'S14'><span>Mitochondrially localised moieties</span></h2><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S9'><span style="white-space: normal"><span >[compartments, uniqueCompartments] = getCompartment(model.mets);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >isMitochondrial=strcmp(</span><span style="color: rgb(170, 4, 249);">'m'</span><span >,compartments);</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >nnz(isMitochondrial)</span></span></div><div  class = 'S2'><div class='variableElement' style='font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12px; '>ans = 0</div></div></div><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: normal"><span >isCompletelyMitochondrialMoiety = ~any(arm.L(:,~isMitochondrial),2);</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >nnz(isCompletelyMitochondrialMoiety)</span></span></div><div  class = 'S2'><div class='variableElement' style='font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12px; '>ans = 6</div></div></div><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: normal"><span >mitochondrialMoietyFraction = sum(arm.L(:,isMitochondrial),2)./sum(arm.L,2);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >figure;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >title(</span><span style="color: rgb(170, 4, 249);">'Fraction of moiety incidence that is mitochondrial'</span><span >)</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >hist(mitochondrialMoietyFraction)</span></span></div><div  class = 'S2'><div class="inlineElement eoOutputWrapper embeddedOutputsFigure" uid="76C15808" data-testid="output_44" style="width: 450px;"><div class="figureElement"><img class="figureImage figureContainingNode" src="" style="width: 560px;"></div></div></div></div><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: normal"><span >bool= mitochondrialMoietyFraction==1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >C = cell(nnz(bool),8);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >n=1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">for </span><span >i=1:size(arm.L,1)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">if </span><span >bool(i)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        ind = find(arm.L(i,:)~=0);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        C(n,1:8) = {i,nnz(arm.L(i,:)),nnz(model.S((arm.L(i,:)~=0)',:)~=0),moietyFormulae{i},moietyMasses(i),model.mets{ind(1)},model.metNames{ind(1)},model.metFormulas{ind(1)}};</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        n=n+1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >C=sortrows(C,5,</span><span style="color: rgb(170, 4, 249);">'descend'</span><span >);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >T=cell2table(C);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >T.Properties.VariableNames={</span><span style="color: rgb(170, 4, 249);">'index'</span><span >,</span><span style="color: rgb(170, 4, 249);">'metabolites'</span><span >,</span><span style="color: rgb(170, 4, 249);">'rxns'</span><span >,</span><span style="color: rgb(170, 4, 249);">'moietyformula'</span><span >,</span><span style="color: rgb(170, 4, 249);">'mass'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Examplemet'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Examplename'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Exampleformula'</span><span >};</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >size(T,1)</span></span></div><div  class = 'S2'><div class='variableElement' style='font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12px; '>ans = 0</div></div></div><div class="inlineWrapper"><div  class = 'S13'><span style="white-space: normal"><span >disp(T)</span></span></div></div></div><h2  class = 'S12'><span></span></h2><h3  class = 'S15'><span>Transitive moiety, of sufficient mass, with moderate incidence</span></h3><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S9'><span style="white-space: normal"><span >isTransititiveMoiety= strcmp(</span><span style="color: rgb(170, 4, 249);">'Transitive'</span><span >,moietyTypes);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >isModerateIncidence = moietyIncidence&gt;=7 &amp; moietyIncidence&lt;=100;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >isSufficientMass = moietyMasses &gt; 2;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >isSufficientMinimalMassFraction = minimalMassFraction &gt; 0.1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >bool = isTransititiveMoiety &amp; isModerateIncidence &amp; isSufficientMass &amp; isSufficientMinimalMassFraction;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >C = cell(nnz(bool),9);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >n=1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">for </span><span >i=1:size(arm.L,1)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">if </span><span >bool(i)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        ind = find(strcmp(minimalMassMetabolite{i},model.mets));</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        C(n,1:9) = {i,nnz(arm.L(i,:)),nnz(model.S((arm.L(i,:)~=0)',:)~=0),moietyFormulae{i},moietyMasses(i),minimalMassMetabolite{i},model.metNames{ind},model.metFormulas{ind},minimalMassFraction(i)};</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        n=n+1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >C=sortrows(C,9,</span><span style="color: rgb(170, 4, 249);">'descend'</span><span >);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >T=cell2table(C);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >T.Properties.VariableNames={</span><span style="color: rgb(170, 4, 249);">'index'</span><span >,</span><span style="color: rgb(170, 4, 249);">'metabolites'</span><span >,</span><span style="color: rgb(170, 4, 249);">'rxns'</span><span >,</span><span style="color: rgb(170, 4, 249);">'moietyformula'</span><span >,</span><span style="color: rgb(170, 4, 249);">'mass'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Minimalmassmetabolite'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Name'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Formula'</span><span >,</span><span style="color: rgb(170, 4, 249);">'Massfraction'</span><span >};</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >size(T,1)</span></span></div><div  class = 'S2'><div class='variableElement' style='font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12px; '>ans = 0</div></div></div><div class="inlineWrapper"><div  class = 'S13'><span style="white-space: normal"><span >disp(T)</span></span></div></div></div><h2  class = 'S14'><span>Individual moiety subnetwork</span></h2><div  class = 'S6'><span>Examine the metabolites and reactions in an individual moiety subnetwork.</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S9'><span style="white-space: normal"><span >ind = min(size(arm.L,1),32);</span><span style="color: rgb(2, 128, 9);">% anth moiety</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >mBool=arm.L(ind,:)~=0;</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >nnz(mBool)</span></span></div><div  class = 'S2'><div class='variableElement' style='font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12px; '>ans = 5</div></div></div><div class="inlineWrapper"><div  class = 'S3'><span style="white-space: normal"><span >rBool = getCorrespondingCols(model.S, mBool, true(size(model.S,2),1), </span><span style="color: rgb(170, 4, 249);">'inclusive'</span><span >);</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >nnz(rBool)</span></span></div><div  class = 'S2'><div class='variableElement' style='font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12px; '>ans = 6</div></div></div></div><div  class = 'S8'><span>Metabolites</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S9'><span style="white-space: normal"><span >bool=mBool;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >C = cell(nnz(bool),5);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >n=1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">for </span><span >i=1:size(model.S,1)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">if </span><span >bool(i)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        C(n,1:5) = {i,model.mets{i},model.metNames{i},model.metFormulas{i},metMasses(i)};</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        n=n+1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >C=sortrows(C,5,</span><span style="color: rgb(170, 4, 249);">'descend'</span><span >);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >T=cell2table(C);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >T.Properties.VariableNames={</span><span style="color: rgb(170, 4, 249);">'index'</span><span >,</span><span style="color: rgb(170, 4, 249);">'met'</span><span >,</span><span style="color: rgb(170, 4, 249);">'name'</span><span >,</span><span style="color: rgb(170, 4, 249);">'formula'</span><span >,</span><span style="color: rgb(170, 4, 249);">'mass'</span><span >};</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >disp(T)</span></span></div><div  class = 'S2'><div class="inlineElement eoOutputWrapper embeddedOutputsTextElement scrollableOutput" uid="F7963676" data-testid="output_49" data-width="420" data-height="115" data-hashorizontaloverflow="true" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">index</strong>        <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">met</strong>           <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">name</strong>          <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">formula</strong>        <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">mass</strong> 
    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">_____</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">___________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">___________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">____________</strong>    <strong style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">______</strong>

      7      {'34dhphe'}    {'34dhphe'}    {'C9H11NO4'}    197.07
      4      {'tyr_L'  }    {'tyr_L'  }    {'C9H11NO3'}    181.07
      9      {'dopa'   }    {'dopa'   }    {'C8H12NO2'}    154.09
      3      {'o2'     }    {'o2'     }    {'O2'      }     31.99
      6      {'h2o'    }    {'h2o'    }    {'H2O'     }    18.011</div></div></div></div></div><div  class = 'S8'><span>Reactions</span></div><div class="CodeBlock"><div class="inlineWrapper outputs"><div  class = 'S1'><span style="white-space: normal"><span >formulas = printRxnFormula(model, model.rxns(rBool));</span></span></div><div  class = 'S2'><div class="inlineElement eoOutputWrapper embeddedOutputsTextElement" uid="4B8848A9" data-testid="output_50" data-width="420" data-height="87" data-hashorizontaloverflow="false" style="width: 450px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">R1	phe_L + thbpt + o2 	-&gt;	tyr_L + dhbpt + h2o 
R2	thbpt + o2 + tyr_L 	-&gt;	dhbpt + h2o + 34dhphe 
R3	34dhphe + h 	-&gt;	dopa + co2 
EX_o2	o2 	&lt;=&gt;	
EX_h2o	h2o 	-&gt;	
EX_dopa	dopa 	-&gt;	</div></div></div></div><div class="inlineWrapper"><div  class = 'S13'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">return</span></span></div></div></div><h3  class = 'S16'><span>Another Individual moiety subnetwork</span></h3><div  class = 'S6'><span>Specify the index of a particular moiety</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S9'><span style="white-space: normal"><span >ind = min(size(arm.L,1),215);</span><span style="color: rgb(2, 128, 9);">% Nicotinate moiety in iDopaNeuro1.</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >mBool=arm.L(ind,:)~=0;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >nnz(mBool)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >rBool = getCorrespondingCols(model.S, mBool, true(size(model.S,2),1), </span><span style="color: rgb(170, 4, 249);">'inclusive'</span><span >);</span></span></div></div><div class="inlineWrapper"><div  class = 'S5'><span style="white-space: normal"><span >nnz(rBool)</span></span></div></div></div><div  class = 'S8'><span>Metabolites</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S9'><span style="white-space: normal"><span >bool=mBool;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >C = cell(nnz(bool),5);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >n=1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">for </span><span >i=1:size(model.S,1)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">if </span><span >bool(i)</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        C(n,1:5) = {i,model.mets{i},model.metNames{i},model.metFormulas{i},metMasses(i)};</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >        n=n+1;</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >    </span><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >C=sortrows(C,5,</span><span style="color: rgb(170, 4, 249);">'descend'</span><span >);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >T=cell2table(C);</span></span></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: normal"><span >T.Properties.VariableNames={</span><span style="color: rgb(170, 4, 249);">'index'</span><span >,</span><span style="color: rgb(170, 4, 249);">'met'</span><span >,</span><span style="color: rgb(170, 4, 249);">'name'</span><span >,</span><span style="color: rgb(170, 4, 249);">'formula'</span><span >,</span><span style="color: rgb(170, 4, 249);">'mass'</span><span >};</span></span></div></div><div class="inlineWrapper"><div  class = 'S5'><span style="white-space: normal"><span >disp(T)</span></span></div></div></div><div  class = 'S8'><span>Reactions</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S7'><span style="white-space: normal"><span >formulas = printRxnFormula(model, model.rxns(rBool));</span></span></div></div></div><div  class = 'S8'><span>Save analysis results</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S7'><span style="white-space: normal"><span >save([resultsDir  modelName </span><span style="color: rgb(170, 4, 249);">'_ConservedMoietiesAnalysis.mat'</span><span >])</span></span></div></div></div>
<br>
<!-- 
##### SOURCE BEGIN #####
%% Analyse properties of conserved moieties

tutorial_initConservedMoietyPaths
if ~recompute
    load([resultsDir  modelName '_ConservedMoietiesAnalysis.mat'])
    return
end
%% 
% Load the atomically resolved models derived from identifyConservedMoieties.m

load([resultsDir modelName '_arm.mat'])
%% 
% Basic properties of atomically resolved models

disp(arm)
%% 
% Load the model, unless it is also saved with the results.

if 0
    load([dataDir modelName '.mat'])
    model = iDopaNeuro;
else
    model=arm.MRH;
end
%% 
% Identify the stoichiometrically consistent subset of the model

massBalanceCheck=0;
printLevel=1;
[SConsistentMetBool, SConsistentRxnBool1, SInConsistentMetBool, SInConsistentRxnBool, unknownSConsistencyMetBool, unknownSConsistencyRxnBool, model]...
    = findStoichConsistentSubset(model,massBalanceCheck,printLevel);
%% 
% Remove non-atom mapped part of the model, but keep the external reactions

keepRxnBool = getCorrespondingCols(arm.MRH.S, arm.MRH.metAtomMappedBool, true(size(arm.MRH.S,2),1), 'inclusive');
keepRxnBool = keepRxnBool & ~SConsistentRxnBool1;
removeRxnBool = ~(arm.MRH.rxnAtomMappedBool | keepRxnBool);
model = removeRxns(arm.MRH, arm.MRH.rxns(removeRxnBool));
%% 
% Identify the stoichiometrically consistent subset of the model

massBalanceCheck=1;
printLevel=1;
[SConsistentMetBool, SConsistentRxnBool2, SInConsistentMetBool, SInConsistentRxnBool, unknownSConsistencyMetBool, unknownSConsistencyRxnBool, model]...
    = findStoichConsistentSubset(model,massBalanceCheck,printLevel);
%% 
% Table of model properties

rankN=getRankLUSOL(arm.MRH.S(arm.MRH.metAtomMappedBool,arm.MRH.rxnAtomMappedBool));
rankL=getRankLUSOL(arm.L);
rankdATM=getRankLUSOL(incidence(arm.dATM));
rankATG=getRankLUSOL(incidence(arm.ATG));
rankMTG=getRankLUSOL(incidence(arm.MTG));

TT={'Model', 'm+'  , 'Metabolites', size(arm.MRH.S,1);
       ''     , 'm'   , 'Mapped metabolites', nnz(arm.MRH.metAtomMappedBool);
   ''     , 'n+'  , 'Reactions', size(arm.MRH.S,2);
   ''     , ''    ,  'Internal reactions', nnz(SConsistentRxnBool1);
   ''     , ''    ,  'External reactions', nnz(~SConsistentRxnBool1);
   ''     , 'n'   , 'Mapped reactions', nnz(arm.MRH.rxnAtomMappedBool);
   'Mapped model'     , 'm'   , 'size(model.S,1)', rankN;
   ''     , 'n+k'   , 'size(model.S,2)', size(model.S,2);
   ''     , ''    ,  'Internal reactions', nnz(SConsistentRxnBool2);
   ''     , ''    ,  'External reactions', nnz(~SConsistentRxnBool2);
   ''     , 'r'   , 'Rank(N)', rankN;
   ''     , 'm-r' , 'Row rank deficiency(N)', nnz(arm.MRH.metAtomMappedBool) - rankN;
   ''     , ''    ,  'Isomorphism classes', size(arm.L,1); 
   ''     , ''    ,  'Independent isomorphism classes', rankL; 
   'MTG'  , ''    ,  'Moieties', size(arm.I2M,2); 
   ''     , ''    ,  'Moiety transitions', size(arm.M2I,1); 
   ''     , ''    ,  'Rank(M)', rankMTG; 
  'ATG'   , ''    ,  'Atoms', size(arm.I2A,2); 
   ''     , ''    ,  'Atom transitions', size(arm.A2I,1); 
   ''     , ''    ,  'Rank(A)', rankATG; 
   ''     , ''    ,  'Row rank deficiency(A)', size(arm.I2A,2) - rankATG;
   ''     , ''    ,  'Components', size(arm.C2A,1); 
'dATM'    , ''    ,  'Atoms', size(arm.dATM.Nodes,1); 
   ''     , ''    ,  'Directed atom transition instances', size(arm.dATM.Edges,1); 
   ''     , ''    ,  'Rank(dATM)', rankdATM; 
   ''     , ''    ,  'Row rank deficiency(dATM)', size(arm.dATM.Edges,1) - rankdATM;
   ''     , ''    ,  '', NaN;  
   };
disp(TT)
%% 
%% Properties of conserved moieties

[moietyMasses, knownmoietyMasses, unknownElements, Ematrix, elements] = getMolecularMass(moietyFormulae);
[metMasses, knownmetMasses, unknownElements, Ematrix, elements] = getMolecularMass(model.metFormulas);
%% 
% Compare the distributions of the molecular moietyMasses

figure
hold on
h = histogram(moietyMasses);
xlabel('mass (AMU)')
ylabel('conserved moiety abundance')
title('Molecular mass of conserved moieties in iDopa model')
%%
%h2.BinWidth = 0.25;
figure
moietyIncidence = sum(arm.L~=0,2);
loglog(moietyMasses,moietyIncidence,'.')
title('Conserved moiety mass vs incidence')
xlabel('mass (AMU)')
ylabel('metabolite incidence')
%% 
% The metabolite mass vs mass weighted incidence of moieties in each metabolite 
% should be a straight line trough the origin if all of the moieties that make 
% up a metabolite are present and the formula for the metabolite is correct. Sometimes 
% the metabolite formula is ambiguous, e.g., FULLR in the formula, so the mass 
% will be incorrect.

figure
approxMetMasses = arm.L'*moietyMasses;
plot(metMasses,approxMetMasses,'.')
xlabel('Metabolite mass')
ylabel('Mass weighted incidence of moieties in each metabolite')
massDifference = abs(approxMetMasses-metMasses)./metMasses;
bool=massDifference >0.1;
n=1;
C = cell(nnz(bool),6);
for i=1:size(model.S,1)
    if bool(i)
        C(n,:)={i, massDifference(i),model.mets{i},model.metFormulas{i},metMasses(i),approxMetMasses(i)};
        n=n+1;
    end
end
C=sortrows(C,5,'descend');
T=cell2table(C);
T.Properties.VariableNames={'index','massDifference','mets','metFormula','metMass','approxMetMass'};
disp(T)
%% 
% 
%% 
% Metabolites with mass most similar to the mass of the moiety they contain

[minimalMassMetabolite, minimalMassFraction, numMinimalMassMetabolites] = representativeMolecule(arm.L,moietyFormulae,model.mets);
if ~isfield(model,'metNames')
    model.metNames = model.mets;
end
%% High molecular weight moieties that are present in many metabolites.

massWeightedIncidence=diag(moietyMasses)*arm.L*ones(size(arm.L,2),1);
[massWeightedIncidenceSorted, xi] = sort(massWeightedIncidence,'descend');
bool=false(size(arm.L,1),1);
bool(xi(1:min(length(xi),30)))=1;
C = cell(nnz(bool),9);
n=1;
for i=1:size(arm.L,1)
    if bool(i)
        ind = find(strcmp(minimalMassMetabolite{i},model.mets));
        C(n,1:9) = {i,nnz(arm.L(i,:)),nnz(model.S((arm.L(i,:)~=0)',:)~=0),moietyFormulae{i},moietyMasses(i),minimalMassMetabolite{i},model.metNames{ind},model.metFormulas{ind},minimalMassFraction(i)};
        n=n+1;
    end
end

C=sortrows(C,5,'descend');
T=cell2table(C);
T.Properties.VariableNames={'index','metabolites','rxns','moietyformula','mass','Minimalmassmetabolite','Name','Formula','Massfraction'};
size(T,1)
disp(T)
%% Moieties that are present in a near maximal number of metabolites.

bool=moietyIncidence>=100;
C = cell(nnz(bool),9);
n=1;
for i=1:size(arm.L,1)
    if bool(i)
        ind = find(strcmp(minimalMassMetabolite{i},model.mets));
        C(n,1:9) = {i,nnz(arm.L(i,:)),nnz(model.S((arm.L(i,:)~=0)',:)~=0),moietyFormulae{i},moietyMasses(i),minimalMassMetabolite{i},model.metNames{ind},model.metFormulas{ind},minimalMassFraction(i)};
        n=n+1;
    end
end

C=sortrows(C,2,'descend');
T=cell2table(C);
T.Properties.VariableNames={'index','metabolites','rxns','moietyformula','mass','Minimalmassmetabolite','Name','Formula','Massfraction'};
size(T,1)
disp(T)
%% Moieties that are present in a moderate number of metabolites.

bool= moietyIncidence>=10 & moietyIncidence<=100;
C = cell(nnz(bool),9);
n=1;
for i=1:size(arm.L,1)
    if bool(i)
        ind = find(strcmp(minimalMassMetabolite{i},model.mets));
        C(n,1:9) = {i,nnz(arm.L(i,:)),nnz(model.S((arm.L(i,:)~=0)',:)~=0),moietyFormulae{i},moietyMasses(i),minimalMassMetabolite{i},model.metNames{ind},model.metFormulas{ind},minimalMassFraction(i)};
        n=n+1;
    end
end

C=sortrows(C,9,'descend');
T=cell2table(C);
T.Properties.VariableNames={'index','metabolites','rxns','moietyformula','mass','Minimalmassmetabolite','Name','Formula','Massfraction'};
size(T,1)
disp(T)
%% Moieties that are present in a small number of metabolites.

bool= moietyIncidence>2 & moietyIncidence<=10;
C = cell(nnz(bool),9);
n=1;
for i=1:size(arm.L,1)
    if bool(i)
        ind = find(strcmp(minimalMassMetabolite{i},model.mets));
        C(n,1:9) = {i,nnz(arm.L(i,:)),nnz(model.S((arm.L(i,:)~=0)',:)~=0),moietyFormulae{i},moietyMasses(i),minimalMassMetabolite{i},model.metNames{ind},model.metFormulas{ind},minimalMassFraction(i)};
        n=n+1;
    end
end

C=sortrows(C,5,'descend');
T=cell2table(C);
T.Properties.VariableNames={'index','metabolites','rxns','moietyformula','mass','Minimalmassmetabolite','Name','Formula','Massfraction'};
size(T,1)
disp(T)
%% Moieties that are present in a minimal number of metabolites.

bool=moietyIncidence==2;
C = cell(nnz(bool),11);
n=1;
for i=1:size(arm.L,1)
    if bool(i)
        ind = find(arm.L(i,:)~=0);
        C(n,1:11) = {i,moietyFormulae{i},moietyMasses(i),model.mets{ind(1)},model.metNames{ind(1)},model.metFormulas{ind(1)},model.mets{ind(2)},model.metNames{ind(2)},model.metFormulas{ind(2)},minimalMassMetabolite{i},minimalMassFraction(i)};
        n=n+1;
    end
end

C=sortrows(C,3,'descend');
T=cell2table(C);
T.Properties.VariableNames={'index','moietyformula','mass','met1','name1','formula1','met2','name2','formula2','Minimalmassmetabolite','Massfraction'};
size(T,1)
disp(T)
%% Classification of conserved moieties

moietyTypes = classifyMoieties(arm.L, model.S);
%% 
% An 'Internal' moiety is one that either does not participate in any exchange 
% reaction or is conserved by all exchange reactions

isInternalMoiety = strcmp('Internal',moietyTypes);
bool = isInternalMoiety;
C = cell(nnz(bool),8);
n=1;
for i=1:size(arm.L,1)
    if bool(i)
        ind = find(arm.L(i,:)~=0);
        C(n,1:8) = {i,nnz(arm.L(i,:)),nnz(model.S((arm.L(i,:)~=0)',:)~=0),moietyFormulae{i},moietyMasses(i),model.mets{ind(1)},model.metNames{ind(1)},model.metFormulas{ind(1)}};
        n=n+1;
    end
end

C=sortrows(C,5,'descend');
T=cell2table(C);
T.Properties.VariableNames={'index','metabolites','rxns','moietyformula','mass','Examplemet','Examplename','Exampleformula'};
size(T,1)
disp(T)
% A 'Transitive' moiety is one that is only found in primary metabolites

isTransititiveMoiety= strcmp('Transitive',moietyTypes);
bool = isTransititiveMoiety;
C = cell(nnz(bool),9);
n=1;
for i=1:size(arm.L,1)
    if bool(i)
        ind = find(strcmp(minimalMassMetabolite{i},model.mets));
        C(n,1:9) = {i,nnz(arm.L(i,:)),nnz(model.S((arm.L(i,:)~=0)',:)~=0),moietyFormulae{i},moietyMasses(i),minimalMassMetabolite{i},model.metNames{ind},model.metFormulas{ind},minimalMassFraction(i)};
        n=n+1;
    end
end

C=sortrows(C,9,'descend');
T=cell2table(C);
T.Properties.VariableNames={'index','metabolites','rxns','moietyformula','mass','Minimalmassmetabolite','Name','Formula','Massfraction'};
size(T,1)
disp(T)
% An 'Integrative' moiety is one that is not conserved in the open network and found in both primary and secondary metabolites.

bool= strcmp('Integrative',moietyTypes);
C = cell(nnz(bool),8);
n=1;
for i=1:size(arm.L,1)
    if bool(i)
        ind = find(arm.L(i,:)~=0);
        C(n,1:8) = {i,nnz(arm.L(i,:)),nnz(model.S((arm.L(i,:)~=0)',:)~=0),moietyFormulae{i},moietyMasses(i),model.mets{ind(1)},model.metNames{ind(1)},model.metFormulas{ind(1)}};
        n=n+1;
    end
end

C=sortrows(C,5,'descend');
T=cell2table(C);
T.Properties.VariableNames={'index','metabolites','rxns','moietyformula','mass','Examplemet','Examplename','Exampleformula'};
size(T,1)
disp(T)
%% Mitochondrially localised moieties

[compartments, uniqueCompartments] = getCompartment(model.mets);
isMitochondrial=strcmp('m',compartments);
nnz(isMitochondrial)
isCompletelyMitochondrialMoiety = ~any(arm.L(:,~isMitochondrial),2);
nnz(isCompletelyMitochondrialMoiety)
mitochondrialMoietyFraction = sum(arm.L(:,isMitochondrial),2)./sum(arm.L,2);
figure;
title('Fraction of moiety incidence that is mitochondrial')
hist(mitochondrialMoietyFraction)
bool= mitochondrialMoietyFraction==1;
C = cell(nnz(bool),8);
n=1;
for i=1:size(arm.L,1)
    if bool(i)
        ind = find(arm.L(i,:)~=0);
        C(n,1:8) = {i,nnz(arm.L(i,:)),nnz(model.S((arm.L(i,:)~=0)',:)~=0),moietyFormulae{i},moietyMasses(i),model.mets{ind(1)},model.metNames{ind(1)},model.metFormulas{ind(1)}};
        n=n+1;
    end
end

C=sortrows(C,5,'descend');
T=cell2table(C);
T.Properties.VariableNames={'index','metabolites','rxns','moietyformula','mass','Examplemet','Examplename','Exampleformula'};
size(T,1)
disp(T)
%% 
% Transitive moiety, of sufficient mass, with moderate incidence

isTransititiveMoiety= strcmp('Transitive',moietyTypes);
isModerateIncidence = moietyIncidence>=7 & moietyIncidence<=100;
isSufficientMass = moietyMasses > 2;
isSufficientMinimalMassFraction = minimalMassFraction > 0.1;
bool = isTransititiveMoiety & isModerateIncidence & isSufficientMass & isSufficientMinimalMassFraction;
C = cell(nnz(bool),9);
n=1;
for i=1:size(arm.L,1)
    if bool(i)
        ind = find(strcmp(minimalMassMetabolite{i},model.mets));
        C(n,1:9) = {i,nnz(arm.L(i,:)),nnz(model.S((arm.L(i,:)~=0)',:)~=0),moietyFormulae{i},moietyMasses(i),minimalMassMetabolite{i},model.metNames{ind},model.metFormulas{ind},minimalMassFraction(i)};
        n=n+1;
    end
end

C=sortrows(C,9,'descend');
T=cell2table(C);
T.Properties.VariableNames={'index','metabolites','rxns','moietyformula','mass','Minimalmassmetabolite','Name','Formula','Massfraction'};
size(T,1)
disp(T)
%% Individual moiety subnetwork
% Examine the metabolites and reactions in an individual moiety subnetwork.

ind = min(size(arm.L,1),32);% anth moiety
mBool=arm.L(ind,:)~=0;
nnz(mBool)
rBool = getCorrespondingCols(model.S, mBool, true(size(model.S,2),1), 'inclusive');
nnz(rBool)
%% 
% Metabolites

bool=mBool;
C = cell(nnz(bool),5);
n=1;
for i=1:size(model.S,1)
    if bool(i)
        C(n,1:5) = {i,model.mets{i},model.metNames{i},model.metFormulas{i},metMasses(i)};
        n=n+1;
    end
end
C=sortrows(C,5,'descend');
T=cell2table(C);
T.Properties.VariableNames={'index','met','name','formula','mass'};
disp(T)
%% 
% Reactions

formulas = printRxnFormula(model, model.rxns(rBool));
return
% Another Individual moiety subnetwork
% Specify the index of a particular moiety

ind = min(size(arm.L,1),215);% Nicotinate moiety in iDopaNeuro1.
mBool=arm.L(ind,:)~=0;
nnz(mBool)
rBool = getCorrespondingCols(model.S, mBool, true(size(model.S,2),1), 'inclusive');
nnz(rBool)
%% 
% Metabolites

bool=mBool;
C = cell(nnz(bool),5);
n=1;
for i=1:size(model.S,1)
    if bool(i)
        C(n,1:5) = {i,model.mets{i},model.metNames{i},model.metFormulas{i},metMasses(i)};
        n=n+1;
    end
end
C=sortrows(C,5,'descend');
T=cell2table(C);
T.Properties.VariableNames={'index','met','name','formula','mass'};
disp(T)
%% 
% Reactions

formulas = printRxnFormula(model, model.rxns(rBool));
%% 
% Save analysis results

save([resultsDir  modelName '_ConservedMoietiesAnalysis.mat'])
##### SOURCE END #####
-->
</div></body></html>